package com.byxy.util;

public class DateUtil {
	public static java.sql.Timestamp dateToTimestamp(java.util.Date date) {
		if (date == null) {
			return null;
		}
		return new java.sql.Timestamp(date.getTime());
	}

	public static java.util.Date timestempToDate(java.sql.Timestamp timestamp) {
		if (timestamp == null) {
			return null;
		}
		return new java.util.Date(timestamp.getTime());
	}

	public static java.sql.Date utilDateTosqlDate(java.util.Date date) {
		if (date == null) {
			return null;
		}
		return new java.sql.Date(date.getTime());
	}
}
